#include "mainwindow.h"

#include <QApplication>
#include <QDialog>
#include <QDebug>
#include <childdialog.h>

int main(int argc, char *argv[])
{
    QApplication a(argc, argv);
    MainWindow w;
//    w.show();
    childDialog childDialog;
    auto res = childDialog.exec();
    if(res == QDialog::Accepted){
        w.show();
        return a.exec();
    }else if(res == QDialog::Rejected){
        qDebug() << "res == QDialog::Rejected" << Qt::endl;
        return 0;
    }

    return a.exec();
}
